<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="tis-620">
	</head>
	<body>
<?php
	include_once("../MasterPages/header.php");
	if(isset($_SESSION[UserSessionName]))
	{		
		echo "<div class='container'>";
		echo "<div class='containerInside'>";
		include_once("../MasterPages/left.php");
		echo '<div class="frame frameBody">';
		if(isset($_GET["page"]) && $_GET["page"]!="") { 
			include_once($_GET["page"]);
		}else{
			$UserSession = unserialize($_SESSION[UserSessionName]);
			switch($UserSession->Role)
			{
				case UserRoleStudent :
					include_once("student-index.php");
					break;
				case UserRoleTeacher :
					include_once("teacher-index.php");
					break;
				case UserRoleAdmin :
					include_once("admin-index.php");
					break;
			}
		}
		echo '</div>';
		echo '</div></div>';
	}else
	{
		header("location:nonregister-index.php");
	}
?> 
	</body>
</html>	